package QL;

import java.util.List;
import java.util.ArrayList;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class ButlerAgentContributionInfo implements IQLResponse
{
    /// <summary>
    /// 玩家Id
    /// </summary>
    public long UserId;

    /// <summary>
    /// 昵称
    /// </summary>
    public String Nickname;

    /// <summary>
    /// 充值总额，单位分
    /// </summary>
    public long TotalRecharge;

    /// <summary>
    /// 总贡献，显示时先除以100
    /// </summary>
    public long TotalContribution;

    /// <summary>
    /// 当天充值，单位分
    /// </summary>
    public long TodayRecharge;

    /// <summary>
    /// 当天贡献，显示时先除以100
    /// </summary>
    public long TodayContribution;

    /// <summary>
    /// 代理级别
    /// </summary>
    public long AgentLevel;

    @Override
    public void DeserializeFromJson(JSONObject jsonObj)
    {
        JSONObject t = jsonObj;
        if (t.has("user_id"))
            UserId = t.getLong("user_id");
        if (t.has("nickname"))
            Nickname = t.getString("nickname");
        if (t.has("total_recharge"))
            TotalRecharge = t.getLong("total_recharge");
        if (t.has("total_contribution"))
            TotalContribution = t.getLong("total_contribution");
        if (t.has("today_recharge"))
            TodayRecharge = t.getLong("today_recharge");
        if (t.has("today_contribution"))
            TodayContribution = t.getLong("today_contribution");
        if (t.has("agent_level"))
            AgentLevel = t.getLong("agent_level");
    }
}
